package mapping;

	import java.awt.BorderLayout;
	import javax.vecmath.Color3f;
	import javax.vecmath.Point2f;
	import javax.vecmath.Point3d;
	import javax.vecmath.Point3f;
	import javax.vecmath.TexCoord2f;
	import javax.vecmath.Vector3d;

	import java.awt.GraphicsConfiguration;
	import java.util.Enumeration;

	import javax.media.j3d.*;
	import javax.swing.JFrame;
	import javax.vecmath.Vector3f;
	import unbboolean.j3dbool.*;
	import com.sun.j3d.utils.universe.SimpleUniverse;
	import unbboolean.solids.*;

	import com.sun.j3d.utils.geometry.Box;
	import com.sun.j3d.utils.geometry.Primitive;
	import com.sun.j3d.utils.geometry.Sphere;
	import com.sun.j3d.utils.image.TextureLoader;


	public class Bump extends BranchGroup{
		
		public Bump() {
			
			Transform3D t = new Transform3D();
			t.rotX(Math.toRadians(20));
			t.setTranslation(new Vector3f(0.0f, 0.0f, -12.0f));
			TransformGroup rootTrans = new TransformGroup(t);
			rootTrans.setCapability(TransformGroup.ALLOW_TRANSFORM_WRITE);
			this.addChild(rootTrans);
		
			BranchGroup bg = new BranchGroup();
			
			
			Transform3D tz = new Transform3D();
			tz.rotZ(Math.PI);
			TransformGroup tg = new TransformGroup(tz);
			Appearance app = new Appearance(); 
			Texture tex = new TextureLoader( "textures/Bamboo123.jpg", null).getTexture();
		    app.setTexture( tex );
		    Sphere sphere = new Sphere( 32f,Primitive.GENERATE_TEXTURE_COORDS |Primitive.GENERATE_NORMALS_INWARD, app );
		    tg.addChild(sphere);
			bg.addChild(tg);
			rootTrans.addChild(bg);
		}
	}


